Configure NFS Client
2013/05/10 |
Configure NIS client.
|
|
[1] | Install NIS |
root@www:~#
aptitude -y install nis
Preconfiguring packages ...
# input domain name |
[2] | Configure as a NIS Client |
root@www:~#
vi /etc/yp.conf # # yp.conf Configuration file for the ypbind process. You can define # NIS servers manually here if they can't be found by # broadcasting on the local net (which is the default). # # See the manual page of ypbind for the syntax of this file. # # IMPORTANT: For the "ypserver", use IP addresses, or make sure that # the host is in /etc/hosts. This file is only interpreted # once, and if DNS isn't reachable yet the ypserver cannot # be resolved and ypbind won't ever bind to the server. # ypserver ypserver.network.com # add at the last: (domain name) (server) (NIS server's hostname) domain srv.world server dlp.srv.world
root@www:~#
vi /etc/nsswitch.conf
passwd:
compat nis # line 7: add group: compat nis # add shadow: compat nis # add
hosts:
files dns nis # add # set follows if needed
root@www:~#
vi /etc/pam.d/common-session # add at the last: create home directory automatically at the first login session optional pam_mkhomedir.so skel=/etc/skel umask=077
root@www:~#
www login: fedora # user on NIS Password: The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-19-generic x86_64) * Documentation: https://help.ubuntu.com/ The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Creating directory '/home/fedora'.fedora@www:~$ # just logined
fedora@www:~$
dlp.srv.world
fedora@www:~$
fedora@www:~$ ypcat passwd wheezy:x:1000:1000:wheezy,,,:/home/wheezy:/bin/bash fedora:x:1001:1001:,,,:/home/fedora:/bin/bash ypcat hosts 127.0.1.1 www 127.0.0.1 localhost 10.0.0.30 dlp |